import { instance } from "../utils/request";
const getAdministratorsPagination = async (page:number,limit:number,key?:string) => {
	return await instance.get("/Administrators/Pagination", {page,limit,key});
};

const addAdministrators = async (data:RequestCreateAdministratorsDto) => {
	return await instance.post("/Administrators/Add", data);
};

const updateAdministrators = async (data:RequestUpdateAdministratorsDto) => {
	return await instance.post("/Administrators/Update", data);
};

const getAdministratorsDetail = async (id:number) => {
	return await instance.get("/Administrators/Detail", { id  });
};

const deleteAdministrators = async (data:RequestIdAdministratorsDto) => {
	return await instance.post("/Administrators/Delete", data);
};

const AdministratorsApi = {
	getAdministratorsPagination,
	addAdministrators,
	updateAdministrators,
	getAdministratorsDetail,
	deleteAdministrators,
};

export default AdministratorsApi
